/**
* Copyright @ 2023 iAuto (Shanghai) Co., Ltd.
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are NOT permitted except as agreed by
* iAuto (Shanghai) Co., Ltd.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/


/**
 * @description 表格
 */
import { Table, TableProps } from 'antd';
import React from 'react';

import { iAutoPagination } from '@/utils/soa/utils';

interface IProps extends TableProps<any> {
  tableProps: any;
  current?: number;
  pageNumber?: number;
}

export default ({ columns, tableProps, rowKey, current, pageNumber }: IProps) => {
  return (
    <Table
      scroll = {{x:1600}}
      columns={columns}
      rowKey={rowKey || 'id'}
      {...tableProps}
      pagination={iAutoPagination(tableProps.pagination, current, pageNumber)}
    />
  );
};
